// 定义与Java中BaseResponse<T>对应的前端数据结构
export interface BaseResponse {
  code: string
  message: string
}

// 单个用户对象的ts类型
export interface Category {
  id: number
  name: string
  parentCategoryId?: number
  createTime: string
}

export interface CategoryAddRequest {
  name: string
  parentCategoryId?: number
}

export interface CategoryQueryRequest {
  name?: string
  current?: number
  pages?: number
}

export interface CategoryUpdateRequest {
  id: number
  name?: string
  parentCategoryId?: number
}
export interface PageCategory extends BaseResponse {
  data: {
    current?: number
    pages?: number
    records?: Array<Category>
    size?: number
    total?: number
  }
}

export interface DeleteRequest {
  id: number
}
